<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>.img-bg{
        position: absolute;
        background: url("qianmengQRcode.jpg") no-repeat;
        width: 90px;
        height: 90px;
        background-size: 100%;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        line-height: 90px;
        font-size: 12px;
    }
    </style>
</head>
<body>
    <div class="img-bg">
        有绝对定位的div水平跟垂直居中

    </div>


</body>
</html>